package com.iad.entity;
import java.io.Serializable;
import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Table;
import javax.persistence.GeneratedValue;
import javax.persistence.ManyToOne;


import static javax.persistence.GenerationType.IDENTITY;

@Entity
@Table(name = "contact_message")
public class ContactMessage implements java.io.Serializable {
  private Long id;
  private String subject;
  private String content;
  private String author;
  private Date date;

  public ContactMessage() {
  }

  public ContactMessage(Long id, String subject, String author, String content, Date date) {
    this.id = id;
    this.subject = subject;
    this.content = content;
    this.date = date;
  }

  @Id
  @GeneratedValue(strategy = IDENTITY)
  @Column(name = "id", unique = true, nullable = false)
  public Long getId() {
    return this.id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  @Column(name = "subject", nullable = false, length = 80)
  public String getSubject() {
    return this.subject;
  }

  public void setSubject(String subject) {
    this.subject = subject;
  }
  
  @Column(name = "author", nullable = false, length = 80)
  public String getAuthor() {
    return this.author;
  }

  public void setAuthor(String author) {
    this.author = author;
  }
  
  @Column(name = "content", nullable = false, length = 2056)
  public String getContent() {
    return this.content;
  }

  public void setContent(String content) {
    this.content = content;
  }
  
  
  @Column(name = "date", unique = false, nullable = false)
  public Date getDate() {
    return this.date;
  }

  public void setDate(Date date) {
    this.date = date;
  }
}
